package com.zhiyou.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhiyou.service.UserService;

//解耦合   不需要继承  HttpServlet 了。

//@RequestMapping("use")
@Controller
public class HelloController {
    
	@Autowired
	UserService userService;
	
	@RequestMapping("hello")
	public  String hello() {
		System.out.println("====hello   controller 被调用=====");
		return "hello";
	}
	
	@RequestMapping("/llogin")
	public String login() {
		//userService.login();
		System.out.println("用户登录==login");
		return "success";
	}
}
